package com.excilys.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

import com.excilys.validator.TestAnnotationValidator;

/**
 * Annotation that makes sure that the amount is a double
 * 
 * @author GF
 * 
 */
@Target({ ElementType.FIELD, ElementType.ANNOTATION_TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = TestAnnotationValidator.class)
@Documented
public @interface TestAnnotation {
	String message() default "The amount is too big and implies extra taxes";

	Class<?>[] groups() default {};

	Class<? extends Payload>[] payload() default {};
}